﻿using System.Windows.Forms;
using System.Drawing;
using Narau.Required_interfaces;

namespace Narau.WindowsForms
{
    class Label_WF : ReqIntf_Label
    {
        private Label ObjWF_Label;

        //--------------
        // Constructor
        //--------------
        public Label_WF(Label inLabelWF)
        {
            ObjWF_Label = inLabelWF;
        }

        //-------------------------------------
        // Establecimiento del tipo de borde
        //-------------------------------------
        public void SetBorder(bool bBorder)
        {
            ObjWF_Label.BorderStyle = bBorder ? BorderStyle.FixedSingle : BorderStyle.None;
        }

        //-------------------------------------
        // Establecimiento del tipo de fuente
        //-------------------------------------
        public void SetFont(ENR_FontType font_type)
        {
            switch (font_type)
            {
                case ENR_FontType.NFT_NIHONGO:
                    ObjWF_Label.Font = GlobalFonts.m_nihongo_font;
                    break;
                case ENR_FontType.NFT_STANDARD:
                    ObjWF_Label.Font = GlobalFonts.m_standard_font;
                    break;
            }
        }

        //----------------------------------------------------
        // Establecimiento del tipo de justificado del texto
        //----------------------------------------------------
        public void SetAlign(ENR_AlignType align_type)
        {
            switch (align_type)
            {
                case ENR_AlignType.NAT_Left:
                    ObjWF_Label.TextAlign = ContentAlignment.MiddleLeft;
                    break;
                case ENR_AlignType.NAT_Center:
                    ObjWF_Label.TextAlign = ContentAlignment.MiddleCenter;
                    break;
            }
        }

        //----------------------------------------
        // Establecimiento del texto de la label
        //----------------------------------------
        public void SetText(string txt)
        {
            ObjWF_Label.Text = txt;
        }
    }
}
